package com.liusand.user.config;

import com.liusand.user.interceptor.UserInterceptor;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * @author :liusha
 * packageName :com.liusand.user.config
 * fileName :MvcSupport
 * creationTime :2022/12/12 20:30
 */
@SpringBootConfiguration
public class MvcSupport extends WebMvcConfigurationSupport {
    @Override
    protected void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new UserInterceptor())
                .addPathPatterns("/**")
                .excludePathPatterns("/user/login","/user/sendSms",
                        "/user/client/**");
    }
}
